unit Unitaccept;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, jpeg, ExtCtrls, Buttons, dxGDIPlusClasses;
 const
   sc_DragMove:LongInt=$F012;
type
  TFaccept = class(TForm)
    Image1: TImage;
    sbaccept: TSpeedButton;
    sbno: TSpeedButton;
    procedure Image1MouseDown(Sender: TObject; Button: TMouseButton;
      Shift: TShiftState; X, Y: Integer);
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    procedure sbacceptClick(Sender: TObject);
    procedure sbnoClick(Sender: TObject);
    procedure Image1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Faccept: TFaccept;
  function myacceptshow(h:Integer):TModalResult;

implementation

{$R *.dfm}

procedure TFaccept.Image1MouseDown(Sender: TObject; Button: TMouseButton;
  Shift: TShiftState; X, Y: Integer);
begin

SendMessage(handle, wm_SysCommand, sc_DragMove, 0);
end;

procedure TFaccept.FormClose(Sender: TObject; var Action: TCloseAction);
begin
Action:=caFree;
end;

procedure TFaccept.sbacceptClick(Sender: TObject);
begin
Self.ModalResult:=mrOk;
end;

procedure TFaccept.sbnoClick(Sender: TObject);
begin
ModalResult:=mrCancel;
end;
 function myacceptshow(h:Integer):TModalResult;
 begin
 Faccept:=TFaccept.Create(nil);
 Result:=Faccept.ShowModal;
 end;

procedure TFaccept.Image1Click(Sender: TObject);
begin
ReleaseCapture;
end;

end.
